//
//  ViewController.m
//  状态模式
//
//  Created by flannery on 2018/12/19.
//  Copyright © 2018年 flannery. All rights reserved.
//

#import "ViewController.h"
#import "Context.h"
#import "State.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    Context *context = Context.new;
    
    StartState *startState = StartState.new;
    [startState doAction:context];
    
    NSLog(@"%@", [context.state description]);
    
    StopState *stopState = StopState.new;
    [stopState doAction:context];
    
    NSLog(@"%@", [context.state description]);
}



@end
